Optimal. Leaf size=316 \[ \frac{\tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right ) \left (48 c^2 \left (a^2 f^2+4 a b e f+b^2 \left (2 d f+e^2\right )\right )-40 b^2 c f (3 a f+2 b e)-64 c^3 \left (a \left (2 d f+e^2\right )+2 b d e\right )+35 b^4 f^2+128 c^4 d^2\right )}{128 c^{9/2}}+\frac{x \sqrt{a+b x+c x^2} \left (-4 c f (9 a f+20 b e)+35 b^2 f^2+48 c^2 \left (2 d f+e^2\right )\right )}{96 c^3}+\frac{\sqrt{a+b x+c x^2} \left (-16 c^2 \left (16 a e f+9 b \left (2 d f+e^2\right )\right )+20 b c f (11 a f+12 b e)-105 b^3 f^2+384 c^3 d e\right )}{192 c^4}+\frac{f x^2 \sqrt{a+b x+c x^2} (16 c e-7 b f)}{24 c^2}+\frac{f^2 x^3 \sqrt{a+b x+c x^2}}{4 c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.62621, antiderivative size = 316, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.148, Rules used = {1661, 640, 621, 206} \[ \frac{\tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right ) \left (48 c^2 \left (a^2 f^2+4 a b e f+b^2 \left (2 d f+e^2\right )\right )-40 b^2 c f (3 a f+2 b e)-64 c^3 \left (a \left (2 d f+e^2\right )+2 b d e\right )+35 b^4 f^2+128 c^4 d^2\right )}{128 c^{9/2}}+\frac{x \sqrt{a+b x+c x^2} \left (-4 c f (9 a f+20 b e)+35 b^2 f^2+48 c^2 \left (2 d f+e^2\right )\right )}{96 c^3}+\frac{\sqrt{a+b x+c x^2} \left (-16 c^2 \left (16 a e f+9 b \left (2 d f+e^2\right )\right )+20 b c f (11 a f+12 b e)-105 b^3 f^2+384 c^3 d e\right )}{192 c^4}+\frac{f x^2 \sqrt{a+b x+c x^2} (16 c e-7 b f)}{24 c^2}+\frac{f^2 x^3 \sqrt{a+b x+c x^2}}{4 c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1661
Rule 640
Rule 621
Rule 206
Rubi steps
\begin{align*} \int \frac{\left (d+e x+f x^2\right )^2}{\sqrt{a+b x+c x^2}} \, dx &=\frac{f^2 x^3 \sqrt{a+b x+c x^2}}{4 c}+\frac{\int \frac{4 c d^2+8 c d e x-\left (3 a f^2-4 c \left (e^2+2 d f\right )\right ) x^2+\frac{1}{2} f (16 c e-7 b f) x^3}{\sqrt{a+b x+c x^2}} \, dx}{4 c}\\ &=\frac{f (16 c e-7 b f) x^2 \sqrt{a+b x+c x^2}}{24 c^2}+\frac{f^2 x^3 \sqrt{a+b x+c x^2}}{4 c}+\frac{\int \frac{12 c^2 d^2+\left (24 c^2 d e-16 a c e f+7 a b f^2\right ) x+\frac{1}{4} \left (35 b^2 f^2-4 c f (20 b e+9 a f)+48 c^2 \left (e^2+2 d f\right )\right ) x^2}{\sqrt{a+b x+c x^2}} \, dx}{12 c^2}\\ &=\frac{\left (35 b^2 f^2-4 c f (20 b e+9 a f)+48 c^2 \left (e^2+2 d f\right )\right ) x \sqrt{a+b x+c x^2}}{96 c^3}+\frac{f (16 c e-7 b f) x^2 \sqrt{a+b x+c x^2}}{24 c^2}+\frac{f^2 x^3 \sqrt{a+b x+c x^2}}{4 c}+\frac{\int \frac{\frac{1}{4} \left (96 c^3 d^2-35 a b^2 f^2+4 a c f (20 b e+9 a f)-48 a c^2 \left (e^2+2 d f\right )\right )+\frac{1}{8} \left (384 c^3 d e-105 b^3 f^2+20 b c f (12 b e+11 a f)-16 c^2 \left (16 a e f+9 b \left (e^2+2 d f\right )\right )\right ) x}{\sqrt{a+b x+c x^2}} \, dx}{24 c^3}\\ &=\frac{\left (384 c^3 d e-105 b^3 f^2+20 b c f (12 b e+11 a f)-16 c^2 \left (16 a e f+9 b \left (e^2+2 d f\right )\right )\right ) \sqrt{a+b x+c x^2}}{192 c^4}+\frac{\left (35 b^2 f^2-4 c f (20 b e+9 a f)+48 c^2 \left (e^2+2 d f\right )\right ) x \sqrt{a+b x+c x^2}}{96 c^3}+\frac{f (16 c e-7 b f) x^2 \sqrt{a+b x+c x^2}}{24 c^2}+\frac{f^2 x^3 \sqrt{a+b x+c x^2}}{4 c}+\frac{\left (128 c^4 d^2+35 b^4 f^2-40 b^2 c f (2 b e+3 a f)-64 c^3 \left (2 b d e+a \left (e^2+2 d f\right )\right )+48 c^2 \left (4 a b e f+a^2 f^2+b^2 \left (e^2+2 d f\right )\right )\right ) \int \frac{1}{\sqrt{a+b x+c x^2}} \, dx}{128 c^4}\\ &=\frac{\left (384 c^3 d e-105 b^3 f^2+20 b c f (12 b e+11 a f)-16 c^2 \left (16 a e f+9 b \left (e^2+2 d f\right )\right )\right ) \sqrt{a+b x+c x^2}}{192 c^4}+\frac{\left (35 b^2 f^2-4 c f (20 b e+9 a f)+48 c^2 \left (e^2+2 d f\right )\right ) x \sqrt{a+b x+c x^2}}{96 c^3}+\frac{f (16 c e-7 b f) x^2 \sqrt{a+b x+c x^2}}{24 c^2}+\frac{f^2 x^3 \sqrt{a+b x+c x^2}}{4 c}+\frac{\left (128 c^4 d^2+35 b^4 f^2-40 b^2 c f (2 b e+3 a f)-64 c^3 \left (2 b d e+a \left (e^2+2 d f\right )\right )+48 c^2 \left (4 a b e f+a^2 f^2+b^2 \left (e^2+2 d f\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{4 c-x^2} \, dx,x,\frac{b+2 c x}{\sqrt{a+b x+c x^2}}\right )}{64 c^4}\\ &=\frac{\left (384 c^3 d e-105 b^3 f^2+20 b c f (12 b e+11 a f)-16 c^2 \left (16 a e f+9 b \left (e^2+2 d f\right )\right )\right ) \sqrt{a+b x+c x^2}}{192 c^4}+\frac{\left (35 b^2 f^2-4 c f (20 b e+9 a f)+48 c^2 \left (e^2+2 d f\right )\right ) x \sqrt{a+b x+c x^2}}{96 c^3}+\frac{f (16 c e-7 b f) x^2 \sqrt{a+b x+c x^2}}{24 c^2}+\frac{f^2 x^3 \sqrt{a+b x+c x^2}}{4 c}+\frac{\left (128 c^4 d^2+35 b^4 f^2-40 b^2 c f (2 b e+3 a f)-64 c^3 \left (2 b d e+a \left (e^2+2 d f\right )\right )+48 c^2 \left (4 a b e f+a^2 f^2+b^2 \left (e^2+2 d f\right )\right )\right ) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{128 c^{9/2}}\\ \end{align*}
Mathematica [A] time = 0.536985, size = 251, normalized size = 0.79 \[ \frac{\tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+x (b+c x)}}\right ) \left (48 c^2 \left (a^2 f^2+4 a b e f+b^2 \left (2 d f+e^2\right )\right )-40 b^2 c f (3 a f+2 b e)-64 c^3 \left (a \left (2 d f+e^2\right )+2 b d e\right )+35 b^4 f^2+128 c^4 d^2\right )}{128 c^{9/2}}+\frac{\sqrt{a+x (b+c x)} \left (-8 c^2 \left (a f (32 e+9 f x)+b \left (36 d f+18 e^2+20 e f x+7 f^2 x^2\right )\right )+10 b c f (22 a f+24 b e+7 b f x)-105 b^3 f^2+16 c^3 \left (12 d (2 e+f x)+x \left (6 e^2+8 e f x+3 f^2 x^2\right )\right )\right )}{192 c^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.062, size = 706, normalized size = 2.2 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.84519, size = 1457, normalized size = 4.61 \begin{align*} \left [\frac{3 \,{\left (128 \, c^{4} d^{2} - 128 \, b c^{3} d e + 16 \,{\left (3 \, b^{2} c^{2} - 4 \, a c^{3}\right )} e^{2} +{\left (35 \, b^{4} - 120 \, a b^{2} c + 48 \, a^{2} c^{2}\right )} f^{2} + 16 \,{\left (2 \,{\left (3 \, b^{2} c^{2} - 4 \, a c^{3}\right )} d -{\left (5 \, b^{3} c - 12 \, a b c^{2}\right )} e\right )} f\right )} \sqrt{c} \log \left (-8 \, c^{2} x^{2} - 8 \, b c x - b^{2} - 4 \, \sqrt{c x^{2} + b x + a}{\left (2 \, c x + b\right )} \sqrt{c} - 4 \, a c\right ) + 4 \,{\left (48 \, c^{4} f^{2} x^{3} + 384 \, c^{4} d e - 144 \, b c^{3} e^{2} - 5 \,{\left (21 \, b^{3} c - 44 \, a b c^{2}\right )} f^{2} + 8 \,{\left (16 \, c^{4} e f - 7 \, b c^{3} f^{2}\right )} x^{2} - 16 \,{\left (18 \, b c^{3} d -{\left (15 \, b^{2} c^{2} - 16 \, a c^{3}\right )} e\right )} f + 2 \,{\left (48 \, c^{4} e^{2} +{\left (35 \, b^{2} c^{2} - 36 \, a c^{3}\right )} f^{2} + 16 \,{\left (6 \, c^{4} d - 5 \, b c^{3} e\right )} f\right )} x\right )} \sqrt{c x^{2} + b x + a}}{768 \, c^{5}}, -\frac{3 \,{\left (128 \, c^{4} d^{2} - 128 \, b c^{3} d e + 16 \,{\left (3 \, b^{2} c^{2} - 4 \, a c^{3}\right )} e^{2} +{\left (35 \, b^{4} - 120 \, a b^{2} c + 48 \, a^{2} c^{2}\right )} f^{2} + 16 \,{\left (2 \,{\left (3 \, b^{2} c^{2} - 4 \, a c^{3}\right )} d -{\left (5 \, b^{3} c - 12 \, a b c^{2}\right )} e\right )} f\right )} \sqrt{-c} \arctan \left (\frac{\sqrt{c x^{2} + b x + a}{\left (2 \, c x + b\right )} \sqrt{-c}}{2 \,{\left (c^{2} x^{2} + b c x + a c\right )}}\right ) - 2 \,{\left (48 \, c^{4} f^{2} x^{3} + 384 \, c^{4} d e - 144 \, b c^{3} e^{2} - 5 \,{\left (21 \, b^{3} c - 44 \, a b c^{2}\right )} f^{2} + 8 \,{\left (16 \, c^{4} e f - 7 \, b c^{3} f^{2}\right )} x^{2} - 16 \,{\left (18 \, b c^{3} d -{\left (15 \, b^{2} c^{2} - 16 \, a c^{3}\right )} e\right )} f + 2 \,{\left (48 \, c^{4} e^{2} +{\left (35 \, b^{2} c^{2} - 36 \, a c^{3}\right )} f^{2} + 16 \,{\left (6 \, c^{4} d - 5 \, b c^{3} e\right )} f\right )} x\right )} \sqrt{c x^{2} + b x + a}}{384 \, c^{5}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (d + e x + f x^{2}\right )^{2}}{\sqrt{a + b x + c x^{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.39602, size = 410, normalized size = 1.3 \begin{align*} \frac{1}{192} \, \sqrt{c x^{2} + b x + a}{\left (2 \,{\left (4 \,{\left (\frac{6 \, f^{2} x}{c} - \frac{7 \, b c^{2} f^{2} - 16 \, c^{3} f e}{c^{4}}\right )} x + \frac{96 \, c^{3} d f + 35 \, b^{2} c f^{2} - 36 \, a c^{2} f^{2} - 80 \, b c^{2} f e + 48 \, c^{3} e^{2}}{c^{4}}\right )} x - \frac{288 \, b c^{2} d f + 105 \, b^{3} f^{2} - 220 \, a b c f^{2} - 384 \, c^{3} d e - 240 \, b^{2} c f e + 256 \, a c^{2} f e + 144 \, b c^{2} e^{2}}{c^{4}}\right )} - \frac{{\left (128 \, c^{4} d^{2} + 96 \, b^{2} c^{2} d f - 128 \, a c^{3} d f + 35 \, b^{4} f^{2} - 120 \, a b^{2} c f^{2} + 48 \, a^{2} c^{2} f^{2} - 128 \, b c^{3} d e - 80 \, b^{3} c f e + 192 \, a b c^{2} f e + 48 \, b^{2} c^{2} e^{2} - 64 \, a c^{3} e^{2}\right )} \log \left ({\left | -2 \,{\left (\sqrt{c} x - \sqrt{c x^{2} + b x + a}\right )} \sqrt{c} - b \right |}\right )}{128 \, c^{\frac{9}{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]